/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.crm.action.sale;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.crm.mapper.sale.OfferDetMesMapper;
public class OfferDetMes extends BaseAction
{
    @Autowired(required=false)
	private OfferDetMesMapper mapper;
    /**
    报价管理
    */
    
    public Map offerDetMes() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        result.put("produce", produce);
        
        
        SQLList<SQLMap> price=mapper.price(params);
        result.put("price", price);
        
        
        SQLList<SQLMap> quo=mapper.quo(params);
        SQLMap quo_emt=quo.getExistfirst();
        result.put("quo", quo_emt);
        
        
        SQLList<SQLMap> pum=mapper.pum(params);
        result.put("pum", pum);
        
        
        SQLList<SQLMap> s_demand=mapper.s_demand(params);
        result.put("s_demand", s_demand);
        
        
        SQLList<SQLMap> s_condition=mapper.s_condition(params);
        result.put("s_condition", s_condition);
        
        
        SQLList<SQLMap> s_explain=mapper.s_explain(params);
        result.put("s_explain", s_explain);
        
        
        SQLList<SQLMap> s_breakduty=mapper.s_breakduty(params);
        result.put("s_breakduty", s_breakduty);
        
        
        SQLList<SQLMap> s_pay=mapper.s_pay(params);
        result.put("s_pay", s_pay);
        
        
        SQLList<SQLMap> s_duty=mapper.s_duty(params);
        result.put("s_duty", s_duty);
        
        
        SQLList<SQLMap> s_num=mapper.s_num(params);
        SQLMap s_num_emt=s_num.getExistfirst();
        result.put("s_num", s_num_emt);
        
        return result;
    }
    /**
    修改
    */
    
    public Map offerUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> quo=mapper.quo(params);
        SQLMap quo_emt=quo.getExistfirst();
        result.put("quo", quo_emt);
        
        
        SQLList<SQLMap> produce=mapper.produce(params);
        result.put("produce", produce);
        
        
        SQLList<SQLMap> cmessg=mapper.cmessg(params);
        result.put("cmessg", cmessg);
        
        
        SQLList<SQLMap> s_predict=mapper.s_predict(params);
        result.put("s_predict", s_predict);
        
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        
        SQLList<SQLMap> lct=mapper.lct(params);
        result.put("lct", lct);
        
        return result;
    }
    /**
    选择付款条件
    */
    
    public Map paymentConditionChoice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_condition=mapper.s_condition(params);
        result.put("s_condition", s_condition);
        
        
        
        return result;
    }
    /**
    条目选择
    */
    
    public Map entryChoiceList() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        produce.setSelectNone("produce备注");
        result.put("produce", produce);
        
        
        SQLList<SQLMap> classid=mapper.classid(params);
        classid.setSelectNone("classid备注");
        result.put("classid", classid);
        
        
        SQLList<SQLMap> s_tree_menu=mapper.s_tree_menu(params);
        result.put("s_tree_menu", s_tree_menu);
        
        
        SQLList<SQLMap> product_list=mapper.product_list(params);
        result.put("product_list", product_list);
        
        
        SQLList<SQLMap> pro_price=mapper.pro_price(params);
        SQLMap pro_price_emt=pro_price.getExistfirst();
        result.put("pro_price", pro_price_emt);
        
        
        SQLList<SQLMap> s_price=mapper.s_price(params);
        SQLMap s_price_emt=s_price.getExistfirst();
        result.put("s_price", s_price_emt);
        
        
        SQLList<SQLMap> s_pose=mapper.s_pose(params);
        SQLMap s_pose_emt=s_pose.getExistfirst();
        result.put("s_pose", s_pose_emt);
        
        return result;
    }
    /**
    修改付款条件
    */
    
    public Map entryChoiceUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_condition=mapper.s_condition(params);
        SQLMap s_condition_emt=s_condition.getExistfirst();
        result.put("s_condition", s_condition_emt);
        
        return result;
    }
    /**
    选择报价说明
    */
    
    public Map suppExplainChoice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_explain=mapper.s_explain(params);
        result.put("s_explain", s_explain);
        
        return result;
    }
    /**
    修改报价说明
    */
    
    public Map suppExplainUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_explain=mapper.s_explain(params);
        SQLMap s_explain_emt=s_explain.getExistfirst();
        result.put("s_explain", s_explain_emt);
        
        return result;
    }
    /**
    客户报价
    */
    
    public Map suppCustomer() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        result.put("produce", produce);
        
        
        SQLList<SQLMap> price=mapper.price(params);
        result.put("price", price);
        
        
        SQLList<SQLMap> quo=mapper.quo(params);
        SQLMap quo_emt=quo.getExistfirst();
        result.put("quo", quo_emt);
        
        
        SQLList<SQLMap> pum=mapper.pum(params);
        result.put("pum", pum);
        
        
        SQLList<SQLMap> s_demand=mapper.s_demand(params);
        result.put("s_demand", s_demand);
        
        
        SQLList<SQLMap> s_breakduty=mapper.s_breakduty(params);
        result.put("s_breakduty", s_breakduty);
        
        
        SQLList<SQLMap> s_pay=mapper.s_pay(params);
        result.put("s_pay", s_pay);
        
        
        SQLList<SQLMap> s_duty=mapper.s_duty(params);
        result.put("s_duty", s_duty);
        
        return result;
    }
    /**
    打印信息
    */
    
    public Map printInfo() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> quo=mapper.quo(params);
        SQLMap quo_emt=quo.getExistfirst();
        result.put("quo", quo_emt);
        
        
        SQLList<SQLMap> s_num=mapper.s_num(params);
        SQLMap s_num_emt=s_num.getExistfirst();
        result.put("s_num", s_num_emt);
        
        
        SQLList<SQLMap> s_condition=mapper.s_condition(params);
        result.put("s_condition", s_condition);
        
        
        SQLList<SQLMap> s_explain=mapper.s_explain(params);
        result.put("s_explain", s_explain);
        
        
        SQLList<SQLMap> pum=mapper.pum(params);
        result.put("pum", pum);
        
        
        SQLList<SQLMap> s_relation=mapper.s_relation(params);
        SQLMap s_relation_emt=s_relation.getExistfirst();
        result.put("s_relation", s_relation_emt);
        
        return result;
    }
    /**
    */
    
    public Map d_producenum() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_producenum(params);
        
        return result;
    }
    /**
    */
    
    public Map d_condition() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_condition(params);
        
        return result;
    }
    /**
    */
    
    public Map d_explain() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_explain(params);
        
        return result;
    }
    /**
    修改修改
    */
    
    public Map offerUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int u_quo = mapper.u_quo(params);
        result.put("u_quo", u_quo);
        
        return result;
    }
    /**
    选择付款条件修改
    */
    
    public Map paymentConditionChoiceSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("condition")){
            params=new SQLParam(request,emt.getMap());
            mapper.i_condition(params);
        }
        
        
        
        return result;
    }
    /**
    条目选择修改
    */
    
    public Map entryChoiceListSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("quo_producenum")){
            params=new SQLParam(request,emt.getMap());
            mapper.u_product(params);
        }
        
        return result;
    }
    /**
    修改付款条件修改
    */
    
    public Map entryChoiceUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        return result;
    }
    /**
    选择报价说明修改
    */
    
    public Map suppExplainChoiceSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("explain")){
            params=new SQLParam(request,emt.getMap());
            mapper.i_explain(params);
        }
        
        return result;
    }
    /**
    修改报价说明修改
    */
    
    public Map suppExplainUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        return result;
    }
    /**
    打印信息修改
    */
    
    public Map printInfoSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID = mapper.CMID(params);
        result.put("CMID", CMID);
        
        
        mapper.printInfoSubmit(params);
        
        return result;
    }
}